﻿using System;
using UnityEngine;

public class USObserverKeyframe : ScriptableObject
{
    public Camera camera;
    public bool fired;
    [SerializeField]
    private float fireTime;
    public USTimelineObserver observer;
    public bool prevActiveState;

    public float FireTime
    {
        get
        {
            return this.fireTime;
        }
        set
        {
            if (this.observer != null)
            {
                this.fireTime = Mathf.Min(Mathf.Max(value, 0f), this.observer.Sequence.Duration);
            }
            else
            {
                this.fireTime = value;
            }
        }
    }
}

